package com.distributeredis.redis_springboot.spring_fast_json.d01_fastjsontest.jsontypetest;

import com.alibaba.fastjson.JSON;
import org.junit.Test;

import java.util.Date;

public class TestJsonType {
    @Test
    public void test() {
        UserPeopleJsonType upj = new UserPeopleJsonType();
        upj.setUserName("zs");
        upj.setUserAge(22);
        upj.setUserBirthday(new Date());
        upj.setUserAddress("河南");
        System.out.println(JSON.toJSONString(upj));
        // {"userAddress":"河南","userName":"zs","userBirthday":"2024-02-13"}
    }
}
